package com.learn;

import java.util.ArrayList;
import java.util.Scanner;

public class Start {
    public static void main(String[] args) {
        ArrayList arrayList = new ArrayList<Integer>();
        arrayList.add(1);
        arrayList.add(2);
        arrayList.add(4);
        System.out.println(pop(arrayList));
//        ---------------
        Integer num = new Integer(5);
//          ----
        System.out.println(f1(3.2, 1100, 28));

    }

    public static Integer pop(ArrayList<Integer> arrayList) {
        int size = arrayList.size() - 1;
        return arrayList.get(size);
    }

    public static ArrayList<Integer> push(ArrayList<Integer> arrayList, Integer a) {
        int index = arrayList.size();
        arrayList.add(a);
        return arrayList;
    }

    static double f1(double a, int b, int c) {
        double po = 0;
        if (a >= 3.7 && (b >= 1200 || c >= 26)) {
            po = 30000;
        } else if (a >= 3.0 || b >= 1200 || c >= 26) {
            po = 15000;
        }
        return po;
    }
}
